package com.mtgdeckbuilder.server;

import java.util.Arrays;
import java.util.List;

import com.mtgdeckbuilder.shared.dto.CardDTO;

/**
 * A mock of a Magic The Gathering source. ONLY FOR TEST PURPOSE.
 * 
 * @author Nicolas Deslandes
 */
public class MockSourceImpl extends MagicSource {

   @Override
   public List<CardDTO> query(final CardDTO card, final int limit) {
      return Arrays.asList(generateCard());
   }

   private CardDTO generateCard() {
      final CardDTO card = new CardDTO();
      card.setMultiverseId(207334L);
      card.setName("Birds of Paradise");
      card.setCost("G");
      card.setText("Flying \n TAP: Add one mana of any color to your mana pool.");
      card.setEdition("Limited Edition Alpha");
      card.setOtherEditions(Arrays.asList("Limited Edition Alpha", "Limited Edition Beta", "Unlimited Edition", "Revised Edition", "Fourth Edition", "Fifth Edition", "Classic Sixth Edition", "Seventh Edition", "Eighth Edition", "Tenth Edition", "Magic 2010", "Ravnica: City of Guilds", "Magic 2011"));
      return card;
   }

}
